<?php
/*
Template Name: Supplier Search Form
Auther: Naseer Ahnad
Created: 18-03-2012
*/
get_header(); 
?>

  <div class="main-content-inner global-width">
  
    <aside class="one-third">
      <?php get_sidebar(); ?>
    </aside>
    
    <section class="contents two-third">
        <h1>Search Supplier</h1>
        <form action="http://armchairweddingguru.co.uk/suppliers-search-result/" method="post">
          <table>
            <tr>
              <td>County:</td>
              <?php
					$args=array("parent" => 3, "hide_empty"	=> 0);
					$countries = get_categories($args); 
			  ?>
              <td><select name="county">
                  <option>Select County</option>
                  <?php foreach($countries as $country):?>
                  <optgroup label="<?php echo $country->cat_name ?>">
                  	<?php	
						$args=array("parent" =>  $country->cat_ID, "hide_empty"	=> 0);
						$cities = get_categories($args); 
						foreach($cities as $city):
					 ?>
                          <option value="<?php echo $city->cat_ID ?>">
                          <?php echo $city->cat_name ?>
                          </option>
                     <?php endforeach; ?>
                  </optgroup>
                  <?php endforeach?>
                </select></td>
            </tr>
            <tr>
              <td>Supplier Name:</td>
              <td><input type="text" name="supplierName" /></td>
            </tr>
            <tr>
              <td colspan="2" align="center"><input type="submit" value="Search" class="search-button" /></td>
            </tr>
          </table>
        </form>
        <div class="clear"></div>
    </section>
    <div class="clearfix"></div>
  </div>

<!-- Main Content Ends -->
</section>
<?php get_footer(); ?>